{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "3aa69f14",
   "metadata": {},
   "outputs": [],
   "source": [
    "a = 'abcd%sdcba' % 'ffffffffff'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "8833254d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abcdffffffffffdcba'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "027ddbbf",
   "metadata": {},
   "outputs": [],
   "source": [
    "a1 = 'ancd%ddbcsa' % 123"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "d0fc7fb9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'ancd123dbcsa'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "3fda1a3c",
   "metadata": {},
   "outputs": [],
   "source": [
    "a2 = 'asd%015dada'% 123"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "b2353963",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'asd000000000000123ada'"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "1481ff8c",
   "metadata": {},
   "outputs": [],
   "source": [
    "a3 = f'abced{1234},{\"asda11111\"}asga'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "bd340e49",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abced1234,asda11111asga'"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "a85e0170",
   "metadata": {},
   "outputs": [],
   "source": [
    "a = [1,2,3,4,5,56]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "c5c9d618",
   "metadata": {},
   "outputs": [],
   "source": [
    "b = '这个数是{0}'.format(a[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "872c4ea1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'这个数是2'"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "08cf6156",
   "metadata": {},
   "outputs": [],
   "source": [
    "c = dict([('aaa',1),('bbb',2),('ccc',3)])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "923425c4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'aaa': 1, 'bbb': 2, 'ccc': 3}"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "4b139338",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'这个数是2'"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "d02d6e66",
   "metadata": {},
   "outputs": [],
   "source": [
    "b1 = '这个数是{0}'.format(c['aaa'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "f5969d2f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'这个数是2'"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f48cbcae",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
